package com.homework.vehicle.Ship;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/3/26 19:42
 * @description
 */
public class WarShip extends Ship{
    private String ship;

    public WarShip() {
    }

    public WarShip(String type, String ship) {
        super(type);
        this.ship = ship;
    }

    @Override
    public void getInfo(){
        System.out.print(getType()+ship);
    }
    @Override
    public void atk() {
        System.out.println("可以攻击");
    }

    @Override
    public String toString() {
        return "WarShip{" +
                "ship='" + ship + '\'' +
                '}';
    }
}
